package dl.bukkit.myststus.command;

import dl.bukkit.myststus.MyStatus;
import dl.bukkit.myststus.api.event.ReloadEvent;
import dl.bukkit.myststus.library.CommandSenderType;
import dl.bukkit.myststus.library.ats.GCommand;
import org.bukkit.Bukkit;
import org.bukkit.command.CommandSender;

@GCommand(
        cmd = "reload",
        type = CommandSenderType.ALL,
        author = "DogLong"
)
public class ReloadCommand implements ICommand {
    @Override
    public void onCommand(CommandSender sender, String[] args) {
        MyStatus.reload();
        Bukkit.getPluginManager().callEvent(new ReloadEvent(sender));
    }

    @Override
    public String getHelp() {
        return "重载配置文件";
    }
}
